package cn.tx.sboot.di;/*
 *
 * @author 陈粒
 * @version 创建时间：2021/8/13 17:36
 */

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
//DI测试类
public class DiTest {
    @Test
    public void TestDi() {
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");//创建IOC容器
        Object o=ac.getBean("teacher");//DI
        System.out.println(o);
        o.toString();
    }
}
